<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>美食分享平台</title>
    <link th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}" rel="stylesheet">
    <link th:href="@{/asserts/css/FoodShare.css}" rel="stylesheet">
</head>
<body>
<!--引入抽取的topbar-->
<div th:replace="common/topbar::topbar"></div>

<div class="container-fluid">
    <div class="row">
        <!--引入侧边栏-->
        <div th:replace="common/sidebar::sidebar(active='link')"></div>
        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <form action="/foodshare/link/saveLink" method="post">
                <input type="hidden" name="linkId" th:value="${link.linkId}">
                <div class="form-row">
                    <div class="form-group col-md-6">
                        <label>链接名称</label>
                        <input type="text" class="form-control" name="linkName" th:value="${link.linkName}">
                    </div>
                    <div class="form-group col-md-6">
                        <label>状态</label>
                        <select name="status" th:value="${link.status}" class="form-control">
                            <option th:selected="${link.status eq 1}">1</option>
                            <option th:selected="${link.status eq 0}">0</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label>链接地址</label>
                    <input class="form-control" rows="3" name="linkUrl" th:value="${link.linkUrl}">
                </div>
                <button class="btn btn-primary" type="submit">修改</button>
            </form>
        </main>
    </div>
</div>
</body>
</html>